<?php

session_start();

if(isset($_SESSION['foo'])){
	$_SESSION['foo'] += 2;
} else {
	$_SESSION['foo'] = 1;
}

echo $_SESSION['foo'];
